package com.coffee.admin.service.platform.dao;

import com.coffee.admin.api.platform.query.PlatformPermissionQuery;
import com.coffee.admin.service.platform.bean.PlatformPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PlatformPermissionDao {
	public PlatformPermission findById(Integer id);
	
	public PlatformPermission findByIdForUpdate(Integer id);
	
	public List<PlatformPermission> findByIds(@Param("idList") List<Integer> idList);

	public Integer count(@Param("param") PlatformPermissionQuery param);

	public List<PlatformPermission> page(@Param("param") PlatformPermissionQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

	public List<PlatformPermission> list(@Param("param") PlatformPermissionQuery param);

	public PlatformPermission findFirst(@Param("param") PlatformPermissionQuery param);

	public Integer insert(PlatformPermission param);

	Integer insertBatch(List<PlatformPermission> list);

	public void updateById(@Param("param") PlatformPermission param);
	
	public Integer deleteById(Integer id);
	
	public Integer deleteByIds(List<Integer> idList);

	List<String> getPlatformPermissionListByRoleIdList(@Param("roleIdList") List<Integer> roleIdList);
	
}